Boolean logic, Logic gates and Logic circuits



Learning Objectives : Student should be able to -


Q1. a)  What is  Logic Gate ? 

✬  A logic gate is a device that performs a boolean logic operation on one or more binary inputs and then produces a single binary output.

✬  Several logic gates are combined together to form a logic circuit which are designed to carry out a specific function.

✬  Logic gates are the fundamental building blocks of digital integrated circuits in Computer, Memory chips and Controlling devices.

b)  Describe Truth-table with its purpose.

✬  A truth-table is a chart with rows and columns to trace the output from a logic-gate or logic circuit.

✬  Each column of the table is used to show different possible inputs and a single output of the logical function for the given logic gate or circuit.

✬  Each row of the table breaks down the logical function by listing all possible input values to calculate and find its output.

✬  NOT-gate is the only logic gate with one input, and the other five gates have two inputs.

c)  Name and describe three basic logic gates with symbol.

✬  The three basic logic gates are ;

  1.  NOT-gate
  2.  AND-gate
  3.  OR-gate

The relationship between the input and the output is of these three basic logic gates are as follows -

Name
Symbol
Description
Truth-table
NOT - gate NOT-gate The output X is l,
if the input A is NOT 1

Logic notation : X = NOT A

Boolean expression : X = A

Input
A
Output
X
0 1
1 0
AND - gate AND-gate The output X is l,
if both the inputs
(A is 1 AND B is 1)

Logic notation : X = A AND B

Boolean expression : X = A . B

Input Output
A B X
0 0 0
0 1 0
1 0 0
1 1 1
OR - gate OR-gate The output X is l,
if either the inputs
(A is 1 OR B is 1) and, if both the inputs A and B is 1.

Logic notation : X = A OR B

Boolean expression : X = A + B

Input Output
A B X
0 0 0
0 1 1
1 0 1
1 1 1
Note :
⇒   (dot sign) represents the AND operation.
⇒  + (plus sign) represents the OR operation.
⇒  A Bar above the letter, e.g. A, represents the NOT operation.

b)   The basic Logic gates can be combined to create another different types of logic-gates.
Describe  NAND ,  NOR and  ExOR logic-gates are formed by the combination of two basic logic-gates.

Name / Symbol
Combination of logic-gates
Description

NAND - gate

NAND-gate

Logic notation :
X = (A NAND B)

Logic notation : X = NOT (A AND B)

NOT of AND-gate

Boolean expression : X = (A . B)

The output X is 1,
if both the inputs (A AND B) are NOT 1.

Input Working Output
A B X=A.B X
0 0 0.0 1
0 1 0.1 1
1 0 1.0 1
1 1 1.1 0

NOR - gate

NOR-gate

Logic notation :
X = (A NOR B)

Logic notation : X = NOT (A OR B)

NOT of OR-gate

Boolean expression : X = (A + B)

The output X is 1,
if neither inputs (A NOR B)
is 1.

Input Working Output
A B X=A+B X
0 0 0+0 1
0 1 0+1 0
1 0 1+0 0
1 1 1+1 0

ExOR - gate
(or) XOR - gate

XOR-gate

Logic notation :
X = (A XOR B)

Boolean Exp. :
X = A B

ExOR stands for 'Exclusive OR', because it is similar to OR-gate, except that, it excludes the boolean expression "OR BOTH 1"
i.e. "1 + 1 = 0".

Logic notation : X = (A OR B) AND
                                    NOT (A AND B)

Boolean exp. : X = (A + B) (AB)

XOR-gate Combination-2



Logic notation : X = (A AND NOT B)
                            OR (NOT A AND B)

Boolean expression : X = (AB)+(AB)

XOR-gate Combination-1

The output X is 1, if either
inputs (A is 1 OR B is 1), but
NOT both (A is 1 AND B is 1).

Input Working Output
A B X=A⊕B X
0 0 0 ⊕ 0 0
0 1 0 ⊕ 1 1
1 0 1 ⊕ 0 1
1 1 1 ⊕ 1 0

The output X is 1, if the inputs
(A is 1 AND B is 0)
OR (A is 0 AND B is 1).

Note :
⇒  NAND is Inverse of AND-gate. Boolean expression for its output 'X' is, X = (A•B)
⇒  NOR is Inverse of OR-gate. Boolean expression for its output 'X' is, X = (A+B)
⇒  Output for ExOR-gate is similar to OR-gate,
except that it excludes (1 + 1 = 1) and replace it by (11 = 0) ;
Output of ExOR-gate is 'True', if both of its inputs are different.

Q2.  Draw a logic circuit for a system which uses 3 switches A, B and C ; a combination of switches which determines whether an alarm X sounds.

If switch A is ON and switch B is OFF, or if switch B is ON and switch C is OFF then a signal to sound an alarm X=1 is produced.

Step-1 :  Represent the given scenario in term of Logic statement.

Output X=1, if (A is ON AND B is OFF) OR (B is ON AND C is OFF)

Since, ON means 1 and OFF means 0 (i.e. NOT 1). The above logic statement could be written as -

Output X=1, if  (A is 1 AND B is NOT 1OR  (B is 1 AND C is NOT 1)

Step-2 :  Above Logic statement has two separate Groups, which are joined by OR-gate.

Draw each Group separately, using the inputs A, B and C.

Q3(1)

Step-3 :  Join the output of two groups with OR-gate to complete the Logic-circuit.

Q3(2)

Q3.  Draw a logic circuit for a chemical process protected by a logic circuit. There are three inpus to the logic circuit representing key parameters of the chemical process.

An alarm 'X' will give an output value of 1 depending on certain conditions in the chemical process. The following table describes the process conditions being monitored :

Parameter description Parameter Binary value Condition
chemical reaction rate R 0 < 40 mol/ltr./sec.
1 >= 40 mol/ltr./sec.
process temperature T 0 > 115 0C
1 <= 115 0C
concentration of chemicals C 0 = 4 mol
1 > 4 mol

An alarm X, will generate the value 1 if any of the following combination of conditions occur :

either   reaction rate < 40 mol/ltr./sec.
or         concentration > 4 mol AND temperature > 115 0C
or         reaction rate >= 40 mol/ltr./sec. AND temperature > 115 0C.

Step-1 :  Convert the given conditions into Logic statements.

  1. either reaction rate < 40 mol/ltr./sec.
                R is 0
                R is NOT 1
  2. OR      concentration > 4 mol AND temperature > 115 0C
                C is 1 AND T is 0
                C is 1 AND T is NOT 1
  3. OR      reaction rate >= 4 mol/ltr./sec. AND temperature > 115 0C
                R is 1 AND T is 0
                R is 1 AND T is NOT 1

Step-2 :  Draw Logic-circuit for each group of Logic statements.

  1. either

    Q4(1)

  2. OR

    Q4(2)

  3. OR

    Q4(3)

Step-3 :  Join the first 2-groups (1 and 2) with OR-gate.

(R is NOT 1) OR (C is 1 AND T is NOT 1)

Q4(4)

Step-4 :  Finally complete the Logic-circuit by joining the Step-3 circuit with the 3rd groups using OR-gate.

(R is NOT 1) OR (C is 1 AND T is NOT 1) OR (R is 1 AND T is NOT 1)

Q4(5)

Q4.  Write a logic statement that corresponds with the following logic circuit.

Q5

Step-1 :  Start writing the Logic statements for each logic-gate, connected to the input lines at the left side of the logic circuit, that produces a single output at its right side.

  1. (A is 1 AND B is 1)

  2. (B is NOT 1 OR C is 1)

Step-2 :  Identify the Logic-gates that joins the outputs of Step-1 and write the logic-statement to connect it.

(A is 1 AND B is 1) AND (B is NOT 1 OR C is 1)

Step-3 :  Continue the Step-1 and Step-2 until the final output 'X' is attained.

Hence, the Logic-statement for the above logic-circuit is ;

Output X = 1, if the inputs (A is 1 AND B is 1) AND (B is NOT 1 OR C is 1)

Q5.  Using NAND-gate as building-block, it is possible to create any Logic-gate like, NOT, AND and OR gate.

a)   Describe how  'NAND gate',  can replace the  'NOT gate' .

⇒  When a single input signal, is passed through an NAND-gate, the logic-circuit so formed, is equivalent to NOT-gate.

gate-Q6(a)1
Input
A
Working
(AA)
Output
X = (AA)
0 (00) 1
1 (11) 0
gate-Q6(a)2

b)   Describe how  'NAND gate',  can replace the  'AND gate' .

⇒  When an NAND-gate, is inverted, the logic-circuit so formed, is equivalent to AND-gate.

gate-Q6(b)1
Input
A
Input
B
Working
P1=(A•B)
Output
X = P1
0 0 (00)=1 0
0 1 (01)=1 0
1 0 (10)=1 0
1 1 (11)=0 1
gate-Q6(b)2

C)   Describe how  'NAND gate',  can replace the  'OR gate' .

⇒  When both the input signals to an NAND-gate, is inverted, the logic-circuit so formed, is equivalent to OR-gate.

gate-Q6(c)1
Input
A
Input
B
Working
P1=(AB)   X=P1
Output
X
0 0 (00)=1   1=0 0
0 1 (01)=0   0=1 1
1 0 (10)=0   0=1 1
1 1 (11)=0   0=1 1
gate-Q6(c)2

Q6.  Using NOR-gate as building-block, it is possible to create any Logic-gate like, NOT, AND and OR gate.

a)   Describe how  'NOR gate',  can replace the  'NOT gate' .

⇒  When a single input signal, is passed through an NOR-gate, the logic-circuit so formed, is equivalent to NOT-gate.

gate-Q7(a)1
Input
A
Working
(A+A)
Output
X = (A+A)
0 (0+0) 1
1 (1+1) 0
gate-Q7(a)2

b)   Describe how  'NOR gate',  can replace the  'OR gate' .

⇒  When an NOR-gate, is inverted, the logic-circuit so formed, is equivalent to OR-gate.

gate-Q7(b)1
Input
A
Input
B
Working
P1=(A+B)
Output
X = P1
0 0 (0+0)=1 0
0 1 (0+1)=0 1
1 0 (1+0)=0 1
1 1 (1+1)=0 1
gate-Q7(b)2

C)   Describe how  'NOR gate',  can replace the  'AND gate' .

⇒  When both the input signals to an NOR-gate, is inverted, the logic-circuit so formed, is equivalent to AND-gate.

gate-Q7(c)1
Input
A
Input
B
Working
P1=(A+B)   X=P1
Output
X
0 0 (0+0)=1   1=0 0
0 1 (0+1)=1   1=0 0
1 0 (1+0)=1   1=0 0
1 1 (1+1)=0   0=1 1
gate-Q7(c)2

Q7.  Re-draw the following logic circuit using  NAND  gate only.

gate-Q8(1)

⇒  Identify the AND-gates followed by NOT-gate, and replace that group with NAND-gate,

gate-Q8(2)

since "NOT of AND-gate" is NAND-gate.

⇒  Replace the AND-gates with NOT of NAND-gate, (i.e. Inverse AND=gate twice will remain the same AND-gate).

gate-Q8(4)

gate-Q8(2)

⇒  Finally, the logic circuit with NAND-gates only would be ;

gate-Q8(5)

Q8. a)  Complete the truth-table for the following logic circuit which is made up of NOR gates only.

gate-Q9(a)1

⇒  Assign a name, like G1, G2, G3, ... X for each Logic-gate's Output in the Logic circuit. Like -

gate-Q9(a)2

⇒  Complete the truth table by finding output of each logic gate and finally the output ‘X’ of the logic circuit.

Input Working Output
A B G1=A,   G2=B,      G3=(G1+G2) X = G3
0 0 1           1           (1+1) = 0 1
0 1 1           0           (1+0) = 0 1
1 0 0           1           (0+1) = 0 1
1 1 0           0           (0+0) = 1 0

What single logic gate has the same function as the above circuit ?

⇒  The truth-table produced for the given logic circuit is equivalent to NAND-gate.
Hence, the given logic circuit can be replace by single NAND-gate.

NAND-gate

b)  Complete the truth-table for the following logic circuit which is made up of NAND gates only.

gate-Q9(b)1

⇒  Assign a name, like G1, G2, G3, ... X for each Logic-gate's Output in the Logic circuit. Like -

gate-Q9(b)2

⇒  Complete the truth table by finding output of each logic gate and finally the output ‘X’ of the logic circuit.

Input Working Output
A B G1=A,   G2=B,      G3=(G1•G2) X = G3
0 0 1           1           (1•1) = 0 1
0 1 1           0           (1•0) = 1 0
1 0 0           1           (0•1) = 1 0
1 1 0           0           (0•0) = 1 0

What single logic gate has the same function as the above circuit ?

⇒  The truth-table produced for the given logic circuit is equivalent to NOR-gate.
Hence, the given logic circuit can be replace by single NOR-gate.

NOR-gate




* * * * * * * * *
* * * * * *
* * *
*